import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from utils import ArgParser, LOG
from translator import PDFTranslator, TranslationConfig

if __name__ == '__main__':
    arg_parser = ArgParser()
    args = arg_parser.parse_arguments()

    config = TranslationConfig()
    config.initialize(args)

    translator = PDFTranslator()
    translator.translate_pdf(config.input_file,
                               config.output_file_format,
                               config.source_language,
                               config.target_language,
                               pages=None)
